package nowcoder.written_examination.wangyi;

import java.util.Scanner;

/**
 * @author fance
 * @date 18-6-30 上午4:56
 */
public class MainI {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            int k = scanner.nextInt();
            int[] a = new int[n];
            int i = 0;
            long cnt = 0;
            for (int j = 0; j < n; j++) {
                
            }
                    for (int l = 0; l < a.length - 1; l++) {
                        if (a[l + 1] >= a[l] || a[l] % a[l + 1] != 0) {
                            cnt++;
                        }
                    }

            System.out.println(cnt % 1000000007);
            }
        }
    }

   /* public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = scanner.nextInt();
            }
            List<List<Integer>> res = permuteIIWithDup(a);
            int diff = 0;
            for (List<Integer> nums : res) {
                diff = Math.max(diff(nums),diff);
            }
            System.out.println(diff);
        }
    }
    private static int diff(List<Integer> nums) {
        int diff = 0;
        for (int i = 0; i < nums.size() - 1; i++) {
            diff += Math.abs(nums.get(i + 1) - nums.get(i));
        }
        return diff;
    }

    public static List<List<Integer>> permuteIIWithDup(int[] nums){
        List<List<Integer>> res = new ArrayList<>();
        Arrays.sort(nums);
        backtrackForpermuteIIWithDup(res,new ArrayList<>(), nums,new boolean[nums.length]);
        return res;
    }
    private static void backtrackForpermuteIIWithDup(List<List<Integer>> res, List<Integer> tmpList,
                                              int [] nums, boolean[] used) {
        if (tmpList.size() == nums.length) {
            res.add(new ArrayList<>(tmpList));
        } else {
            for (int i = 0; i < nums.length; i++) {
                if (used[i] || (i > 0 && nums[i] == nums[i - 1] && !used[i - 1])) {
                    continue;
                }
                used[i] = true;
                tmpList.add(nums[i]);
                backtrackForpermuteIIWithDup(res,tmpList,nums,used);
                used[i] = false;
                tmpList.remove(tmpList.size() - 1);
            }
        }
    }
}*/
    /* public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int x = scanner.nextInt();
            int f = scanner.nextInt();
            int d = scanner.nextInt();
            int p = scanner.nextInt();
            int cnt = 0;
            while (d >= x && f > 0) {
                cnt++;
                f--;
                d -= x;
                if (f == 0) {
                    d -= p;
                    f++;
                }
            }
            System.out.println(cnt);
        }
    }*/

   /* public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String tmp = scanner.nextLine();
            int n = Integer.valueOf(tmp);
            String s = scanner.nextLine();
            String[] str = s.trim().split(" ");
            StringBuilder stringBuilder = new StringBuilder();
            for (int i = 0; i < n; i++) {
                stringBuilder.append(str[i]);
                stringBuilder.reverse();
            }
            String res = stringBuilder.toString();
            for (int i = 0; i < res.length(); i++) {
                if (i == res.length() - 1) {
                    System.out.print(res.charAt(i));
                } else {
                    System.out.print(res.charAt(i) + " ");
                }
            }
            *//*String pre = " ";
            String last = " ";
            boolean flag = true;
            for (int i = str.length - 1; i >= 0; i--) {
                if (flag) {
                    pre += str[i];
                    pre += " ";
                    flag = !flag;
                } else {
                    last += str[i];
                    last += " ";
                    flag = !flag;
                }
            }
            System.out.println(pre.trim() + " " + new StringBuilder(last).reverse().toString().trim());*//*
        }
    }

}
 */   /*public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.next();
            System.out.println(c(s));
        }
    }
    public static int c(String s) {
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i + 1; j <= s.length(); j++) {
                String tmp = s.substring(i,j);
                if (isUnique(tmp) && tmp.length() > max) {
                    max = tmp.length();
                }
            }
        }
        return max;
    }
    public static boolean isUnique(String s) {
        for (int i = 0; i < s.length() - 1; i++) {
            if (s.charAt(i) == s.charAt(i + 1)) {
                return false;
            }
        }
        return true;
    }

}*/

   /* public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                    a[i] = scanner.nextInt();
            }
            Arrays.sort(a);
            int diff = a[1] - a[0];
            boolean flag = false;
            for (int i = 1; i < n - 1; i++) {
                if (a[i + 1] - a[i] != diff) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                System.out.println("Impossible");
            } else {
                System.out.println("Possible");
            }
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.next();
            Set<Character> set = new HashSet<>();
            for (char c : s.toCharArray()) {
                set.add(c);
            }
            if (set.size() == 1) {
                System.out.println(1);
                continue;
            }
            if (set.size() > 2) {
                System.out.println(0);
                continue;
            }
//            ArrayList<String> res = Permutation(s);
//            int cnt = 0;
//            for (String str : res) {
//                int tmp = 0;
//                for (int i = 0; i < str.length() - 1; i++) {
//                    if (str.charAt(i) != str.charAt(i + 1)) {
//                        tmp++;
//                    }
//                }
//                if (tmp < 2) {
//                    cnt++;
//                }
//            }
            System.out.println(2);
        }
    }
   *//* public static ArrayList<String> Permutation(String s) {
        ArrayList<String> res = new ArrayList<>();
        if (s.length() < 1) {
            return res;
        }
        char[] chars = s.toCharArray();
        Arrays.sort(chars);
        backtrack(chars,new boolean[chars.length], "", res);
        return res;
    }
    private static void backtrack(char[] chars, boolean[] used, String s, ArrayList<String> res) {
        if (s.length() == chars.length) {
            res.add(s);
            return;
        }
        for (int i = 0; i < chars.length; i++) {
            if (used[i]) {
                continue;
            }
            if (i != 0 && chars[i] == chars[i - 1] && !used[i - 1]) {
                continue;
            }
            used[i] = true;
            backtrack(chars, used, s + chars[i], res);
            used[i] = false;
        }
    }*//*
}*/
